<?php

use Cartalyst\Sentry\Facades\Laravel\Sentry as Sentry;

$user = Sentry::getUser();
$avatar = $user->avatar == null ? Config::get('probackend::config.sites.avatar-default') : $user->avatar;
$username = $user->first_name . ' ' . $user->last_name;
$email = $user->email;
$groups = $user->getGroups();
?>
<div class="thumbnail">
    <div class="thumb"><img src="{{$avatar}}">
        <div class="thumb-options"><span><a href="#" class="btn btn-icon btn-success"><i class="icon-pencil"></i></a><a href="#" class="btn btn-icon btn-success"><i class="icon-remove"></i></a></span></div>
    </div>
    <div class="caption text-center">
        <h6>{{$username}}<small>{{$email}}</small></h6>
    </div>
</div>
<ul class="list-group">
    @if($user->su===1)
    <li class="list-group-item"><i class="icon-users text-muted"></i>Super Administrator</li>
    @else
    <li class="list-group-item">
        <i class="icon-users text-muted"></i>
        @foreach($groups as $group)
        {{$group->title}},
        @endforeach
    </li>
    @endif
    <li class="list-group-item"><i class="icon-phone3 text-muted"></i>{{$user->mobile}}</li>
    <li class="list-group-item"><i class="icon-home7 text-muted"></i>{{$user->address}}</li>

</ul>
